package com.chexiehui.jc.mvp.mine;

import com.chexiehui.jc.Constants;
import com.chexiehui.jc.base.BaseModel;
import com.chexiehui.jc.base.BasePage;
import com.chexiehui.jc.base.BaseView;
import com.chexiehui.jc.entity.MessageInfo;

import io.reactivex.Observable;
import retrofit2.http.Field;
import retrofit2.http.FormUrlEncoded;
import retrofit2.http.POST;

/**
 * @Description 消息中心
 * @Auth SongJun
 * @Date 2019/11/20 10:05
 **/
public interface MessageListCovenant {

    interface View extends BaseView {
        void onGetListSuccess(BaseModel<BasePage<MessageInfo>> successResult);

        void onGetListFailure(BaseModel<Object> failureResult);

    }

    interface Stores {
        @FormUrlEncoded
        @POST(Constants.URL_GET_MY_MESSAGE_LIST)
        Observable<BaseModel<BasePage<MessageInfo>>> getList(
                @Field("pageIndex") int pageIndex,
                @Field("pageSize") int pageSize
        );
//
//
//        @FormUrlEncoded
//        @POST(Constants.URL_ADD_FOLLOW)
//        Observable<BaseModel<String>> doFollowPerson(
//                @Field("orgid") String orgid,
//                @Field("type") String type
//        );
    }

    interface Presenter {
        void getList(int pageNum);
    }

}